package com.bifang.common.constant.enums.common;

/** 签收人类型 */
public enum AssigneeTypeEnum {
    person("1", "个人"),
    org("2", "组织"),
    role("3", "角色"),
    group("4", "用户组");
    private String type;
    private String text;

    AssigneeTypeEnum(String type, String text) {
        this.type = type;
        this.text = text;
    }

    public String getType() {
        return this.type;
    }

    public String getText() {
        return this.text;
    }

    public static AssigneeTypeEnum getByType(String type) {
        for (AssigneeTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equalsIgnoreCase(type)) {
                return typeEnum;
            }
        }
        return null;
    }
}
